<template>
	<view class="">
		<view class="share-tit">
			<open-data type="userAvatarUrl" class="share-header"></open-data>
			<view class="header-box">
				<open-data type="userNickName" class="header-tit"></open-data>
				<view class="timer">
					<image lazy-load="true"  src="../../static/images/time-1.png" class="time-img"></image>
					<view class="">12分钟之前</view>
				</view>
			</view>
		</view>
		<view class="msg-box">
			<view class="msg-tit">
				{{articleTitle}}
			</view>
			<view class="msg-content">
				{{articleText}}
			</view>
			<scroll-view scroll-x="true" >
				<view class="good-img" >
					<image lazy-load="true"  v-for="(item,key) in imgList" :src="item" @click="showSlider(item)" mode="aspectFit" class="item-img"></image>
				</view>
			</scroll-view>
			<view class="tips-box">
				<view class="tips-list" v-for="(item,key) in topicList" :key="key">{{item}}</view>
			</view>
		</view>
		<view class="bottom-btn">
			<view class="edit" @click="goBackEdit()">继续编辑</view>
			<!-- <view class="submit" @click="tijiao">提交</view> -->
		</view>
	</view>
</template>

<script>
export default {
  data() {
    return {
			imgList:[],
			goodsList:[],
			topicList:[],
			articleTitle:"",
			articleText:""
		}
  },
  onLoad() {
  	this.imgList=uni.getStorageSync("imgList") ? uni.getStorageSync("imgList") : [];
		this.topicList=uni.getStorageSync("article-topic") ? uni.getStorageSync("article-topic") : [];
		this.articleTitle=uni.getStorageSync("article-title") ? uni.getStorageSync("article-title") : [];
		this.articleText=uni.getStorageSync("article-content") ? uni.getStorageSync("article-content") : [];
  },
  onShareAppMessage(res) {
      if (res.from === 'button') {
        console.log(res.target)
      }
      return {
        title: this.$request.share_title,
        path: '/pages/index/index'
      }
    },
  methods: {
    goBackEdit(){
			uni.navigateBack({
				delta:1
			})
	},
	showSlider(item){
		uni.previewImage({
			urls:this.imgList,
			current:item
		})
	},
	tijiao(){
		
	}
		
    
  },
  created() {
  	
  }
}
</script>
<style>
    @import url("preview.css");
</style>